package org.lucava.boatskeeper.client.event.category;

import com.google.gwt.event.shared.GwtEvent;
import java.util.List;

public class DeleteCategoriesEvent extends GwtEvent<CategoryHandler> {

    final private List<Integer> categoryIds;
    public static Type<CategoryHandler> TYPE = new Type<CategoryHandler>();

    public DeleteCategoriesEvent(List<Integer> categoryIds) {
        this.categoryIds = categoryIds;
    }

    public List<Integer> getCategoryIds() {
        return categoryIds;
    }

    @Override
    public Type<CategoryHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(CategoryHandler handler) {
        handler.onDeleteCategories(this);
    }
}